package com.drcoffee.drcoffeemall.controller;


import com.drcoffee.drcoffeemall.entry.Attachment;
import com.drcoffee.drcoffeemall.entry.longRange.PartReq;
import com.drcoffee.drcoffeemall.service.LongRangeService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/*
 * 供后台访问
 * */
@RestController
@RequestMapping("/longRange")
public class LongRangeController {

    @Autowired
    LongRangeService longRangeService;

    @PostMapping("/getAttachment")
    public ResponseEntity<PageInfo<Attachment>> getAttachment(@RequestBody PartReq partReq) {
        return longRangeService.getAttachment(partReq);
    }

}
